import {bannerList} from '../../../request/api'
const state={
    bannerlist:[]
}
const getters={
    getBannerList(state){
        return state.bannerlist
    }
}
const mutations={
    REQ_BANNERLIST(state,payload){
        state.bannerlist=payload
    }
}
const actions={
    changeBannerAction({commit}){
        bannerList().then(res=>{
            if(res.code==200){
                commit('REQ_BANNERLIST',res.list)
            }
        })
    }
}
export default{
    state,
    getters,
    mutations,
    actions,
    // 命名空间
    namespaced:true
}